#ifndef __SIMPLE_LIGHT_H__
#define __SIMPLE_LIGHT_H__
#include "Service.h"
#include "WString.h"

class SimpleLight : public Service{
protected:
	char* buttonName_;
	char* lightCircuit_;

	bool circuitState_;
	virtual void publishCircuitState();
	
	enum State{
		READY,
		BUTTON_EVENT};
	State state_;

	static const char* beginMsg_;
	static const char* stateOn_;
	static const char* stateOff_;


public:
	SimpleLight(IArduino& arduino, MessageRouter& router, const String& name, ILogger& logger, const String& lightCircuit, const String& buttonName);
	~SimpleLight();

	virtual void tick(long milliseconds);
	virtual bool onItem(const String& name, const String& value);
};

#endif